Optimal. Leaf size=19 \[ \frac{A \sin (x)}{\cos (x)+1}-B \log (\cos (x)+1) \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.0677288, antiderivative size = 19, normalized size of antiderivative = 1., number of steps used = 5, number of rules used = 4, integrand size = 13, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.308, Rules used = {4401, 2648, 2667, 31} \[ \frac{A \sin (x)}{\cos (x)+1}-B \log (\cos (x)+1) \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 4401
Rule 2648
Rule 2667
Rule 31
Rubi steps
\begin{align*} \int \frac{A+B \sin (x)}{1+\cos (x)} \, dx &=\int \left (\frac{A}{1+\cos (x)}+\frac{B \sin (x)}{1+\cos (x)}\right ) \, dx\\ &=A \int \frac{1}{1+\cos (x)} \, dx+B \int \frac{\sin (x)}{1+\cos (x)} \, dx\\ &=\frac{A \sin (x)}{1+\cos (x)}-B \operatorname{Subst}\left (\int \frac{1}{1+x} \, dx,x,\cos (x)\right )\\ &=-B \log (1+\cos (x))+\frac{A \sin (x)}{1+\cos (x)}\\ \end{align*}
Mathematica [A] time = 0.0318927, size = 19, normalized size = 1. \[ A \tan \left (\frac{x}{2}\right )-2 B \log \left (\cos \left (\frac{x}{2}\right )\right ) \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.012, size = 19, normalized size = 1. \begin{align*} A\tan \left ({\frac{x}{2}} \right ) +B\ln \left ( \left ( \tan \left ({\frac{x}{2}} \right ) \right ) ^{2}+1 \right ) \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A] time = 0.937644, size = 26, normalized size = 1.37 \begin{align*} -B \log \left (\cos \left (x\right ) + 1\right ) + \frac{A \sin \left (x\right )}{\cos \left (x\right ) + 1} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A] time = 1.92543, size = 88, normalized size = 4.63 \begin{align*} -\frac{{\left (B \cos \left (x\right ) + B\right )} \log \left (\frac{1}{2} \, \cos \left (x\right ) + \frac{1}{2}\right ) - A \sin \left (x\right )}{\cos \left (x\right ) + 1} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [A] time = 0.396981, size = 17, normalized size = 0.89 \begin{align*} A \tan{\left (\frac{x}{2} \right )} + B \log{\left (\tan ^{2}{\left (\frac{x}{2} \right )} + 1 \right )} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A] time = 1.14587, size = 24, normalized size = 1.26 \begin{align*} B \log \left (\tan \left (\frac{1}{2} \, x\right )^{2} + 1\right ) + A \tan \left (\frac{1}{2} \, x\right ) \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]